package org.example.springboot137.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.example.springboot137.entity.Auction;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface AuctionMapper extends BaseMapper <Auction> {
    @Update("update auction set auctionStartPrice=#{auctionStartPrice},auctionName=#{auctionName}," +
            "auctionStartTime=#{auctionStartTime},auctionDesc=#{auctionDesc} where auctionId=#{auctionId}")
    int updateAuction(Auction auction);

    List<Auction> mylist(@Param("integerList") List<Integer> integerList);

    List<Integer> mylistPage(@Param("auctionName") String auctionName);

    Auction updateAll(Integer auctionId);
}
